﻿using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json;

namespace rocket_console
{
    /// <summary>
    /// 参数处理类
    /// </summary>
    class Args
    {
        public Dictionary<string,string> argsArray;
        public Stack<string> tmpStack;
        public Args()
        {
            argsArray=new Dictionary<string,string>();
            tmpStack = new Stack<string>();

            string jsonText = File.ReadAllText(@"rocket.conf");
            Console.WriteLine(jsonText);
            JsonReader reader = new JsonTextReader(new StringReader(jsonText));

            while (reader.Read())
            {
                Console.WriteLine(reader.TokenType + "\t\t" + reader.ValueType + "\t\t" + reader.Value);
                //tmpStack.Push(reader.Value.ToString());
            }
            while (tmpStack.Count != 0)
            {
                //Console.WriteLine(tmpStack);
            }
        }
    }
}
